# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ToolResults.V1beta3.Model.AndroidInstrumentationTest do
  @moduledoc """
  A test of an Android application that can control an Android component independently of its normal lifecycle. See for more information on types of Android tests.

  ## Attributes

  *   `testPackageId` (*type:* `String.t`, *default:* `nil`) - The java package for the test to be executed. Required
  *   `testRunnerClass` (*type:* `String.t`, *default:* `nil`) - The InstrumentationTestRunner class. Required
  *   `testTargets` (*type:* `list(String.t)`, *default:* `nil`) - Each target must be fully qualified with the package name or class name, in one of these formats: - "package package_name" - "class package_name.class_name" - "class package_name.class_name#method_name" If empty, all targets in the module will be run.
  *   `useOrchestrator` (*type:* `boolean()`, *default:* `nil`) - The flag indicates whether Android Test Orchestrator will be used to run test or not.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :testPackageId => String.t() | nil,
          :testRunnerClass => String.t() | nil,
          :testTargets => list(String.t()) | nil,
          :useOrchestrator => boolean() | nil
        }

  field(:testPackageId)
  field(:testRunnerClass)
  field(:testTargets, type: :list)
  field(:useOrchestrator)
end

defimpl Poison.Decoder, for: GoogleApi.ToolResults.V1beta3.Model.AndroidInstrumentationTest do
  def decode(value, options) do
    GoogleApi.ToolResults.V1beta3.Model.AndroidInstrumentationTest.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.ToolResults.V1beta3.Model.AndroidInstrumentationTest do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
